<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>个人基础信息查询</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="${pageContext.request.contextPath }/scripts/boot.js" type="text/javascript"></script>
<style type="text/css">
html,body {
    margin: 0;
    padding: 0;
    border: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
</style>
</head>
<body>
<div style="width:100%;">
  <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
    <table style="border:solid 1px #aaa;width:100%;">
      <tr>
        <td style="width:9%;text-align: right;">社会保障卡号:</td>
        <td style="width:15%;"><input name="aac001" class="mini-textbox" maxLength="10"   emptyText="请输入社会保障卡号" onenter="onKeyEnter" /></td>
        <td style="width:10%;text-align: right;">证件号码：</td>
        <td style="width:20%;"><input name="aac002" style="width:80%;" emptyText="请输入证件号码" maxLength="18" class="mini-textbox" onenter="onKeyEnter" /></td>
        <td style="width:6%;text-align: right;">姓名：</td>
        <td style="width:15%;"><input name="aac003" emptyText="请输入姓名" maxLength="25" class="mini-textbox" onenter="onKeyEnter" /></td>
        <td style="width:15%;text-align: center; white-space:nowrap;">
          <a class="mini-button" iconCls="icon-search" onclick="search()">查询</a>
          <a class="mini-button" iconCls="icon-remove"  onclick="onReset()">重置</a>
        </td>
      </tr>
    </table>
  </div>
</div>
<div style="width:100%;">
  <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
    <table style="width:100%;">
      <tr>
        <td style="width:100%;">
          <a class="mini-button" iconCls="icon-edit" onclick="edit()">编辑</a>
        </td>
      </tr>
    </table>
  </div>
</div>
<div class="mini-fit">
  <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowResize="true"
       url="${pageContext.request.contextPath}/AC01.do?method=getAC01" idField="id">
    <div property="columns">
      <div type="checkcolumn"></div> 
      <div field="aac001" width="120" headerAlign="center" allowSort="true">社会保障卡号</div>
      <div field="aac003" width="120" headerAlign="center" allowSort="true">姓名</div>
      <div field="aac058" width="120" headerAlign="center" allowSort="true">证件类型</div>
      <div field="aac002" width="120" headerAlign="center" allowSort="true">证件号码</div>
      <div field="aac006" width="120" headerAlign="center" allowSort="true" dateFormat="yyyy-MM-dd">出生日期</div>
      <div field="aacc01" width="120" headerAlign="center" allowSort="true" dateFormat="yyyy-MM-dd">证件有效日期</div>
      <div field="aac004" width="120" headerAlign="center" allowSort="true" >性别</div>
      <div field="aac005" width="120" headerAlign="center" allowSort="true">民族</div>
      <div field="aac161" width="120" headerAlign="center" allowSort="true">国籍或地区</div>
      <div field="aae005" width="120" headerAlign="center" allowSort="true">联系电话</div>
    </div>
  </div>
</div>
<script type="text/javascript">
	mini.parse();
    var grid = mini.get("datagrid1");
    var form = new mini.Form("form1");
    grid.load();
    function edit() {
      var row = grid.getSelected();
      if (row) {
          mini.open({
                    url: bootPATH + "../page/AC01/AC01_edit.jsp",
                    title: "编辑", width: 650, height: 460,
                    onload: function () {
                        var iframe = this.getIFrameEl();
                        var data = { action: "edit", id: row.aac001 };
                        iframe.contentWindow.SetData(data);
                        },
                    ondestroy: function (action) {
                        grid.reload();
                        }
                    });
               } else {
                 mini.alert("请选中一条记录");
               }
    }
    function search() {
      var aac001 = mini.getbyName("aac001").getValue().trim();
      var aac002 = mini.getbyName("aac002").getValue().trim();
      var aac003 = mini.getbyName("aac003").getValue().trim();
      if (aac001 == "" && aac002 == "" && aac003 == "") {
         mini.alert("请输入查询条件");
      }
      grid.load({ aac001: aac001, aac002: aac002, aac003: aac003});
      }
    function onKeyEnter(e) {
      search();
    }
    function onReset(e) {
      mini.getbyName("aac001").setValue("");
      mini.getbyName("aac002").setValue("");
      mini.getbyName("aac003").setValue("");
      
    }
</script>
</body>
</html>
